<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:mo="https://gitee.com/aun/Timo"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
    <link rel="stylesheet" th:href="@{/lib/zTree_v3/css/zTreeStyle/zTreeStyle.css}" type="text/css">
</head>
<body class="timo-layout-page">
<div class="layui-card">
    <div class="layui-card-header timo-card-header">
        <span><i class="fa fa-bars"></i> 需求管理</span>
        <i class="layui-icon layui-icon-refresh refresh-btn"></i>
        <a th:href="@{/requirement/manage/export}" shiro:hasPermission="requirement:manage:export"><i class="fa fa-download"></i></a>
    </div>
    <div class="layui-card-body">
        <div class="layui-row timo-card-screen put-row">
            <div class="pull-left layui-form-pane timo-search-box">
<!--                <div class="layui-inline">-->
<!--                    <label class="layui-form-label">状态</label>-->
<!--                    <div class="layui-input-block timo-search-status">-->
<!--                        <select class="timo-search-select" name="status" mo:dict="SEARCH_STATUS"-->
<!--                                mo-selected="${param.status}"></select>-->
<!--                    </div>-->
<!--                </div>-->
<!--                <div class="layui-inline">-->
<!--                    <label class="layui-form-label">需求ID</label>-->
<!--                    <div class="layui-input-block">-->
<!--                        <input type="text" name="bah" th:value="${param.bah}" placeholder="请输入需求ID"-->
<!--                               autocomplete="off" class="layui-input">-->
<!--&lt;!&ndash;                        <input class="layui-input select-tree"&ndash;&gt;-->
<!--&lt;!&ndash;                               th:attr="data-url=@{/system/dept/list}, data-value=${dept?.id}" th:value="${dept?.title}"&ndash;&gt;-->
<!--&lt;!&ndash;                               type="text" name="dept" placeholder="请选择部门">&ndash;&gt;-->
<!--                    </div>-->
<!--                </div>-->
                <div class="layui-inline">
                    <label class="layui-form-label">需求类型</label>
                    <div class="layui-input-block timo-search-status">
                        <select class="timo-search-select" name="requirementType" mo:dict="XQLX" mo-selected="4"
                                ></select>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">需求名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="requirementName" th:value="${param.patientname}" placeholder="请输入需求名称"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline" style="width: 180px;">
                    <label class="layui-form-label">需求状态</label>
                    <div class="layui-input-block timo-search-status" >
                        <select class="timo-search-select" style="width: 90px;" name="requirementStat" mo:dict="XQZT" mo-selected="${xqtype}"></select>
                    </div>
                </div>
<!--                <div class="layui-inline" style="width: 180px;">-->
<!--                    <input type="checkbox" name="showcomplted" title="显示已完成需求" lay-skin="primary">-->
<!--                </div>-->
<!--                <div class="layui-inline">-->
<!--                    <label class="layui-form-label">用户昵称</label>-->
<!--                    <div class="layui-input-block">-->
<!--                        <input type="text" name="nickname" th:value="${param.nickname}" placeholder="请输入用户昵称"-->
<!--                               autocomplete="off" class="layui-input">-->
<!--                    </div>-->
<!--                </div>-->
                <div class="layui-inline">
                    <button class="layui-btn timo-search-btn">
                        <i class="fa fa-search"></i>
                    </button>
                </div>
                <div class="layui-inline">
                    <button class="layui-btn timo-searchshowuser-btn">
                        <i></i> 显示自己提交任务
                    </button>
                </div>
            </div>
            <div class="pull-right screen-btn-group">
                <div class="btn-group-left">
<!--                    <button class="layui-btn open-popup-param" data-title="修改密码" th:attr="data-url=@{/system/user/pwd}"-->
<!--                            shiro:hasPermission="system:user:pwd" data-size="456,242">-->
<!--                        <i class="fa fa-refresh"></i> 修改密码-->
<!--                    </button>-->
<!--                    <button class="layui-btn open-popup-param" data-type="radio" data-title="角色分配"-->
<!--                            th:attr="data-url=@{/raredisease/patient/role}" shiro:hasPermission="raredisease:patient:role"-->
<!--                            data-size="480,400">-->
<!--                        <i class="fa fa-user-secret"></i> 角色分配-->
<!--                    </button>-->
                </div>
                <div class="btn-group-right">
                    <button class="layui-btn open-popup" data-title="添加需求" th:attr="data-url=@{/requirement/manage/add}"
                            shiro:hasPermission="requirement:manage:add" data-size="max">
                        <i class="fa fa-plus"></i> 添加需求
                    </button>
<!--                    <div class="btn-group" shiro:hasPermission="raredisease:patient:status">-->
<!--                        <button class="layui-btn">操作<span class="caret"></span></button>-->
<!--                        <dl class="layui-nav-child layui-anim layui-anim-upbit">-->
<!--                            <dd><a class="ajax-status" th:href="@{/raredisease/patient/status/ok}">启用</a></dd>-->
<!--                            <dd><a class="ajax-status" th:href="@{/raredisease/patient/status/freezed}">冻结</a></dd>-->
<!--                            <dd><a class="ajax-status" th:href="@{/raredisease/patient/status/delete}">删除</a></dd>-->
<!--                        </dl>-->
<!--                    </div>-->
                </div>
            </div>
        </div>
        <div class="timo-table-wrap">
            <table class="layui-table timo-table">
                <thead>
                <tr>
                    <th class="timo-table-checkbox">
                        <label class="timo-checkbox"><input type="checkbox">
                            <i class="layui-icon layui-icon-ok"></i></label>
                    </th>
<!--                    <th class="sortable" data-field="id">需求ID</th>-->
                    <th>需求名称</th>
                    <th>需求类型</th>
                    <th>提交人</th>
                    <th>提交日期</th>
                    <th>需求状态</th>
<!--                    <th>状态</th>-->
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="item:${list}">
                    <td><label class="timo-checkbox"><input type="checkbox" th:value="${item.id}">
                        <i class="layui-icon layui-icon-ok"></i></label></td>
                    <td th:text="${item.requirementName}">需求名称</td>
                    <td th:text="${#dicts.keyValue('XQLX', item?.requirementType)}">需求类型</td>
                    <td th:text="${item.submitUserName}">提交人</td>
                    <td th:text="${item.submitDate}">提交日期</td>
                    <td th:text="${#dicts.keyValue('XQZT', item?.requirementStat)}">需求状态</td>
<!--                    <td th:text="${#dicts.dataStatus(item.state)}">状态</td>-->
                    <td>
                        <a class="open-popup" data-title="编辑需求信息" th:attr="data-url=@{'/requirement/manage/edit/'+${item.id}}"
                           shiro:hasPermission="requirement:manage:edit"
                           data-size="max" href="#">编辑</a>
                        <a class="open-popup" data-title="需求详细信息" th:attr="data-url=@{'/requirement/manage/detail/'+${item.id}}"
                           shiro:hasPermission="requirement:manage:detail"
                           data-size="max" href="#">详细</a>
<!--                        <a class="ajax-get" th:attr="data-msg='您是否删除'+${item.bah}"-->
<!--                           th:href="@{/raredisease/patient/status/delete(ids=${item.id})}"-->
<!--                           shiro:hasPermission="raredisease:patient:status">删除</a>-->
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
        <div th:replace="/common/fragment :: page"></div>
    </div>
</div>
<script th:replace="/common/template :: script"></script>
<script type="text/javascript" th:src="@{/js/plugins/jquery-2.2.4.min.js}"></script>
<script type="text/javascript" th:src="@{/lib/zTree_v3/js/jquery.ztree.core.min.js}"></script>
<script type="text/javascript" th:src="@{/js/timoTree.js}"></script>
<script type="text/javascript">
    var local = window.localStorage;
    // 树形菜单
    $.fn.selectTree({
        rootTree: '全部',
        onSelected: function (treeNode) {
            local.setItem('deptTitle', treeNode.name);
        }
    });
</script>
</body>
</html>